{include file="public/admin_head.html"}

<body>
<form class="form-horizontal" method ="post" action ="./index.php?act=message&st=messageAdd" onsubmit="return checkForm();">
	<legend>
		<B>添加新闻</B>
	</legend>
	<div class="control-group">
	  <label for="input01" class="control-label">规则名称<font color="#FF0000">*</font>：</label>
	  <div class="controls">
	    <input type="text" id="rule_name" class="input-xlarge" name="rule_name">
	  </div>
	</div>
	
	<div class="control-group">
	  <label for="keywords" class="control-label">关键词<font color="#FF0000">*</font>：</label>
	  <div class="controls">
	    <input type="text" id="keywords" class="input-xlarge" name="keywords">
	    <span class="label">多个关键词用分号分开</span>
	  </div>
	</div>	

	<div class="control-group">
	  <label for="input01" class="control-label">回复<font color="#FF0000">*</font>：</label>
	  <div class="controls">
	    <textarea name="message" style="width: 270px; height: 180x;" id="message" rows="8" ></textarea>
	  </div>
	</div>	
	<div class="form-actions">
		<a href="javascript:history.back();" class="btn width-100">返回</a>
		<button class="btn btn-primary width-100 left-60" type="submit"> 确 认 </button>
	</div>
    </form>
<script type="text/javascript">

function checkForm() {
	if($("#rule_name").val() == '') {
		alert("请输入规则名称！");
		$("#rule_name").focus();
		return false;
	}
	if($("#keywords").val() == '') {
		alert("请输入规则名称！");
		$("#keywords").focus();
		return false;
	}
	if($("#message").val() == '') {
		alert("请输入回复内容！");
		$("#message").focus();
		return false;
	}
	return true;
}
</script>

{include file="public/admin_foot.html"}

